$(function () {
    findAllNav();
    findAllCompany();
});

function findAllNav() {
    $.ajax({
        url: '/top/nav/findAllNav',
        data: '',
        type: 'get',
        dataType: 'json',
        success: function (data) {
            // console.log(data.data.NavModel.data,"00000000");
            setNavData(data.data.NavModel.data);
        }
    })
}

function setNavData(data) {
    let html = '';
    for (let i = 0; i < data.length; i++) {
        html +='<div onclick="location.href=\''+data[i].href+'\';">'+data[i].title+'</div>';
    }
    $("#nav").html(html);
    // console.log($("#nav").html())
}
